#pragma once

namespace DeForm
{
	public enum struct MorphologyMode { Erode, Dilate};

	public ref class MorphologyEffectDescription sealed : IEffectDescription
	{
	public:		
		MorphologyEffectDescription(MorphologyMode mode, float width, float height);
		MorphologyEffectDescription();

		virtual EffectType GetEffectType()
		{
			return EffectType::Morphology;
		}

		virtual int GetParametersCount()
		{
			return 3;
		}

		virtual EffectParameterValue^ GetParameter(int index)
		{
			switch (index)
			{
			case 0:
				return ref new EffectParameterValue(D2D1_MORPHOLOGY_PROP_MODE, (int)Mode);
			case 1:
				return ref new EffectParameterValue(D2D1_MORPHOLOGY_PROP_WIDTH, Width);
			case 2:
				return ref new EffectParameterValue(D2D1_MORPHOLOGY_PROP_HEIGHT, Height);
			}

			return nullptr;
		}

		property MorphologyMode Mode;
		property float Width;
		property float Height;
	};
}

